<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="model.pojo.*, java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
    <%
            request.setAttribute("pageTitle", request.getAttribute("profileName"));
    %>
    <%@ include file="/WEB-INF/jspf/header.jspf"%>
    
    <%
            if (request.getAttribute("posts") != null) {
                List<Post> list = (List<Post>) request.getAttribute("posts");

                for (Post p : list) {
    %>
    <div class="portion"> 
    <table align="center" width="80%">
        <tbody>
            <tr>
                <td><%= p.getPostTitle()%></td>
            </tr>
            <tr>
                <td><%= p.getPostText()%></td>
            </tr>
        </tbody>
    </table>
</div>
    <%                }
            } else {
                out.println("<I>No Posts Have Been Submitted by this user</I>");
            }
    %>
    
    <%@ include file="/WEB-INF/jspf/footer.jspf"%>
</html>